// pages/rec_list/index.js
const { $http } = getApp()
Page({
    data: {
        formData: [
            { label:'姓名', name:'name', r:1, maxLen:4 },
            { label:'电话', name:'phone', r:1  },
            { label:'性别', name:'sex', type:'radio', r:1 },
            { label:'看房日期', name:'look_date', type:'date' },
            { label:'看房时间', name:'look_time', type:'date', opt:{ mode:'time' } },
            { label:'备注', name:'mark', type:'textarea'}
        ],
    },
    onSubmit({ detail }){
        $http.post(this,'look_house', {
            param:{ rec:0, ...detail },
            okText: '预约成功',
            back: true
        })
    }
})